double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size) {
    int sumSize=nums1Size+nums2Size;
    int *n=malloc(sizeof(int)*(sumSize));
    int c1=0,c2=0,c3=0;
    while( c1 < nums1Size && c2 < nums2Size ){
        if( nums1[c1] < nums2[c2] )
            n[c3++]=nums1[c1++];
        else
            n[c3++]=nums2[c2++];
    }
    while( c1 < nums1Size )
        n[c3++]=nums1[c1++];
    while( c2 < nums2Size )
        n[c3++]=nums2[c2++];
    if( sumSize%2 )
        return (double)n[sumSize/2];
    else
        return ((double)n[sumSize/2]+n[(sumSize-1)/2])/2;
}
